Linear search problem